{% extends "base.html" %}
{% block content %}
<h4>Edit a Student's Book</h4>
{% if too_many %}
    <p><em>You selected more than one item to edit. You can only edit 1 item at a time.</em></p>
{% endif %}
<div id="admin_form">
    <form method="post" action="{% url update_book_edit %}">
            <input type="hidden" name="IdToEdit" value="{{ id }}" />
            {% include "form.html" %}
            <p class="submit_options">
                <input type="submit" value="Save" name="Action" />
                <input type="submit" name="Action" value="Delete" onclick="DeleteButton='delete'; return confirm('This will permanently delete this item, are you sure?')" />
            </p>
        </div>
    </form>
    <p>History of this item</p>
    <ol id="HistoryOfBook">
    {% for log in logs %}
        <li>{{ log.who.get_full_name }} '{{ log.get_action_display }}' on {{ log.when|date:"Y-m-d H:i:s" }}</li>
    {% endfor %}
    </ol>
{% endblock %}
